<#include "${ftl_skin}/common/header.ftl">

<style type="text/css">
	.cus-text{
		background-color: #f5f5f5;
    	border: 1px solid #ccc;
    	border-radius: 4px;
    	padding:0px 10px;
    	overflow: auto;
	}
</style>

</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-title"></div>
        <div class="ibox-content">



            <!--搜索栏-->

            <form id="bs-form" role="form" class="form-inline">
                <div class="form-group">
                    <label for="logType" class="control-label">日志类型 : </label>
                    <select id="logType" name="type" class="form-control" >
                    	<option value="0" selected="selected" >登录日志</option>
                    	<option value="1" >登出日志</option>
                    	<option value="2" >操作日志</option>
                    </select>
                </div>

                <button class="btn btn-primary" type="button" onclick="searchBSTable('bs-table', 'bs-form');return false;">搜索</button>
            </form>
            <!--/搜索栏-->

            <!--列表-->

            <!--工具栏-->
            <div id="bs-toolbar" class="btn-group">
               <!--  <button type="button" class="btn btn-outline btn-default" onclick="item_add();return false;">
                    <i class="glyphicon glyphicon-plus" aria-hidden="true"></i>
                </button> -->

                <!--
                <button type="button" class="btn btn-outline btn-default">
                    <i class="glyphicon glyphicon-heart" aria-hidden="true"></i>
                </button>
                -->
               <!--  <button type="button" class="btn btn-outline btn-default" onclick="item_del(getIdSelections('bs-table','user_code').toString());return false;">
                    <i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
                </button>
 -->
            </div>
            <!--/工具栏-->

            <table 	id="bs-table"
                      data-url="${path.servicePath}admin/count.do"
                      data-method="post"
                      data-response-handler="pagerTableResponseHandler"
                      data-pagination="true"
                      data-page-list="[10, 20, 50, 100]"

                      data-toolbar="#bs-toolbar"
                      data-resizable="true"
                      
                      data-query-params="setParams"

                      data-side-pagination="server"
                      data-content-type="application/x-www-form-urlencoded;charset=utf-8"

                      data-click-to-select="true"
                      data-single-select="true"
                      data-sort-name="create_time"
                      data-sort-order="desc"
                      

                      data-classes="table table-hover table-condensed"
                      data-striped="true"

                      data-height="500">
                <thead>
                <tr>
                    
                    <th data-field="tableid" data-checkbox="true" data-visible="false" ></th>
                    <th data-field="type_name" data-align="center" data-sortable="false">日志类型</th>
                    <th data-field="content" data-align="center" data-sortable="false">日志概要</th>
                    <th data-field="user_name" data-align="center" data-sortable="false">操作人</th>
                    <th data-field="create_time" data-align="center" data-sortable="false">操作时间</th>

                </tr>
                </thead>
            </table>

            <!--/列表-->



        </div><!-- end ibox-content -->
    </div><!-- end ibox -->
</div><!-- end wrap -->



<#include "${ftl_skin}/common/js.ftl">


<script type="text/javascript">

	function setParams(params){
		params.type=$("#logType").val();
		return params;
	}


    $(function(){

        initBSTable('bs-table', {});
        
        $("#bs-table").on('dbl-click-row.bs.table', function (e, row, ele,field) {
        	var str = JSON.stringify(row.format_content,null,2);
        	var id = "tip-"+ new Date().getTime();
        	var html = "<pre  style='height:350px;' id='"+id+"'>"+str+"</pre>";
        	window.dialog({
     		 	title:"事件:"+row.type_name,
     	    	content: html,
     	    	id: row.tableid,
     	    	 width: 700,
     	         height: 400,
     		}).showModal(window);
        	
        });
       
       
       
    });

</script>

<#include "${ftl_skin}/common/footer.ftl">